home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
098
/
eds.arc
/
EDSSUB.LSP
< prev
next >
Wrap
Text File
|
1980-01-01
|
910b
|
38 lines
;This function moves all the specified entity type in a given
;selection set to a specified layer.
;
;Function name "EDSSUB.LSP" - Execution command "SUB"
;
;Written by Steve Brown and Christopher Conrad
;
;
;
(defun c:sub ( )
(setq new (getstring "\nEnter new layer: "));input new
layer
(setq entype (getstring "\nEnter type of entity: "))
(setq a (ssget)); generate selection set 'a'
(setq le (sslength a)); count # of entities in selection set
(setq counter 0); set counter=0
(while (<= counter (1- le))
(setq name (ssname a counter)); read 1rst entity name in ss 'a'
(setq b (entget name))
(setq d (cdr (assoc '0 b)))
(if (= d entype)
(progn (setq dot (assoc '8 b))
(setq b (subst (cons 8 new) dot b))
(entmod b)))
(setq counter (+ 1 counter))
)
(setq a nil)
(gc)
)